const { setToast, setActionSheet, setDatePicker, setCitySelect } = require('../../utils/util');
// components/Pannel/index.js
Component({
  //  开启多插槽
  options: {
    multipleSlots: true
  },
  /*** 组件的属性列表*/
  properties: {
    tabbar: { type: Boolean, value: false },
    navbar: { type: Boolean, value: false },
    tabs: { type: Boolean, value: false },
    tabList: { type: Array, value: () => ([]) },
    title: { type: String, value: '暂无标题' },
    background: { type: String, value: '#fff' },
    style: { type: String, value: '' },
    finished: { type: Boolean, value: false }
  },

  /**
   * 组件的初始数据
   */
  data: {
  },

  /*** 组件的方法列表*/
  methods: {
    //  下拉刷新
    onRefresh() {
      this.triggerEvent('refresh');
    },
    loadMore() {
        //  加载更多
        this.triggerEvent('loadMore');
    },
  },
  pageLifetimes: {
    show: function() {
      const actionsheet = this.selectComponent('#action-sheet');
      const datepicker = this.selectComponent('#date-picker');
      const cityselect = this.selectComponent('#city-select');

      setActionSheet( actionsheet );
      setDatePicker( datepicker );
      setCitySelect( cityselect );
    }
  },
})
